import request from '@/utils/request'

// 查询物流信息列表
export function listLogistics(query) {
  return request({
    url: '/Logistics/logistics/list',
    method: 'get',
    params: query
  })
}

// 查询物流信息详细
export function getLogistics(deliveryNo) {
  return request({
    url: '/Logistics/logistics/' + deliveryNo,
    method: 'get'
  })
}

// 新增物流信息
export function addLogistics(data) {
  return request({
    url: '/Logistics/logistics',
    method: 'post',
    data: data
  })
}

// 修改物流信息
export function updateLogistics(data) {
  return request({
    url: '/Logistics/logistics',
    method: 'put',
    data: data
  })
}

// 删除物流信息
export function delLogistics(deliveryNo) {
  return request({
    url: '/Logistics/logistics/' + deliveryNo,
    method: 'delete'
  })
}

export function getLogisticsInfo(deliveryNo) {
  return request({
    url: '/Logistics/logistics/getLogisticsInfo/' + deliveryNo,
    method: 'get'
  })
}

export function getLogisticsInfoByOuterOrderNo(outerOrderNo) {
  return request({
    url: '/Logistics/logistics/getLogisticsInfoByOuterOrderNo/' + outerOrderNo,
    method: 'get'
  })
}

export function distinctMroLogisticsList(query) {
  return request({
    url: '/Logistics/logistics/distinctMroLogisticsList',
    method: 'get',
    params: query
  })
}
